﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="teste.aspx.vb" Inherits="ProjetoDeTestes.teste" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="css/south-street/jquery-ui-1.8.17.custom.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="js/jquery-ui-1.8.17.custom.min.js" type="text/javascript"></script>
    <title></title>
    <script type="text/javascript">

        function abrepopUp() {
            $("#eita").dialog('open').parent().appendTo("form");
            return false;
        }
        function alerta(data){
            alert(data.a);
            alert(data.b);
            alert(data.c);
            alert(data.d);
            alert(data.e);
        }
        function chamaMetodo() {
            $.ajax({
                type: "POST",
                url: 'teste.aspx/mudaTexto',
                data: "{}",
                contentType: 'application/json; charset=utf-8',
                dataType: 'json',
                success: function (data) {
                    alerta(data);
                }
            });
        }

        $(document).ready(function () {
            $("#eita").dialog({
                autoOpen: true,
                modal: true,
                close: function () { alert('fechou'); chamaMetodo(); }
            }).parent().appendTo("form");

            //$("p").click(function () { abrepopUp(); });
        });
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="eita" style="display:none">
        <div>Teste do modal dialog!!</div>
        <div>
            <asp:Button ID="Button1" runat="server" Text="Button" /></div>
    </div>
    <p>
        <asp:Button ID="Button2" runat="server" Text="Button" />
    </p>
    <p>clica aqui</p>
    <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Text="dfsfs"></asp:TextBox>
    </form>
</body>
</html>

